Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Front end development



  Replacing small C programs with Haskell

C is the classic go-to tool for small programs that need to be really fast. When scripts.mit.edu needed a small program to be a glorified cat that also added useful HTTP headers to the beginning of its output, there was no question about it: it would be written in C, and it would be fast; the speed of our static content serving depended on it! (The grotty technical details: our webserver is based off of a networked filesystem, and we wanted to avoid giving Apache too many credentials in ca...

   C,Haskell,Small program     2012-01-03 10:51:39

  Empty slice vs nil slice in GoLang

In Go, there is a type called slice which is built on top of array. It's a very convenient type when we want to handle a group of data. This post will explain a subtle but tricky difference between empty slice and nil slice. A nil slice is a slice has a length and capacity of zero and has no underlying array. The zero value of slice is nil. If a slice is declared like below, it is a nil slice. package main import "fmt" func main() { var a []string fmt.Println(a == nil) } The output will be t...

   GOLANG,JSON,EMPTY SLICE,NIL SLICE     2018-10-18 09:25:21

  The Obvious, the Easy, and the Possible

Much of the tension in product development and interface design comes from trying to balance the obvious, the easy, and the possible. Figuring out which things go in which bucket is critical to fully understanding how to make something useful. Shouldn’t everything be obvious? Unless you’re making a product that just does one thing – like a paperclip, for example – everything won’t be obvious. You have to make tough calls about what needs to be obvious, ...

   Software,Obvious,Easy,Possible,Requirements     2011-11-30 11:48:12

  Samsung announces Galaxy S III mini

Samsung announces Galaxy S III mini today, compared to Galaxy S III, the mini version has some changes in screen size and configurations. Below are the detail configurations of Galaxy S III mini: 4-inch screen 800 × 480 resolution 5-megapixel primary camera, VGA front camera 1GHz dual-core processor Android 4.1 operating system Support the Samsung S Voice Personal Assistant, NFC and S Beam transmission function 1GB RAM, two versions with 8GB and 16GB memory, expandable to 32GB with microS...

   Galaxy S III mini,Configuration     2012-10-11 19:27:53

  First page of 2012

The tail of 2011 has gone through my heart silently, Year of 2012 is coming with mystery. Looking back to 2011 and looking forward to 2012, it's time to record something...In the past 2011, nothing specials happened in my life. At the beginning of 2011, I was a college student with full of passion, while at the end of 2011, I am an engineer with 5 month's working experience. At the beginning of 2011, I was struggling through my Final Year Project and job hunting, while at the end of 2011, I am p...

   2012,New year,Mayan,Summary     2012-01-01 05:19:32

  Does Android team like to eat Kitkat?

Google released the new Android development code for Android 4.4 :KitKat.The new version will bring astonishing user experience for Android users. The interesting thing about the name is that it has the same name as one brand of Nescafe's chocolate wafer. Nescafe has authorized that Google can use this name as their development code. We may guess that the project team or the director was eating Kitkat or like to eat Kitkat while they were brainstorming the new development code, so they came out ...

   Android,Kitkat,development code     2013-09-03 23:03:03

  Carriage return and line feed

In programming and document editing, we may frequently encounter carriage return and line feed, i.e the well known CRLF.  But do you know about the history and difference of carriage return and line feed? Before computer came out, there was a type of teleprinter called Teletype Model 33. It can print 10 characters each second. But there is one problem with this, after finishing printing each line, it will take 0.2 second to move to next line, which is time of printing 2 characters. If a new...

   CR,CARRIAGE RETURN,LINE FEED,LF,NEW LINE,CRLF     2017-02-19 08:29:23

  How to use Chome dev tool to find event handler bound to an element

As a front end developer, there is frequent need to debug JS code and sometimes need to find out what event handler has been bound to a HTML element. In this post, we will show how to find out the click event handler bound to a HTML element, this same applies to other events as well. Nowadays, a web application is usually very complicated and there are lots of JS codes which makes it difficult to find out what click event handler has been bound to a HTML element, especially when the JS source co...

   JAVASCRIPT,CHROME,CHROME DEV TOOL,EVENT LISTENER     2019-08-17 22:14:36

  Exit main thread and keep other threads running in C

In C programming, if using return in main function, the whole process will terminate. To only let main thread gone, and keep other threads live, you can use thrd_exit in main function. Check following code: #include #include #include int print_thread(void *s) { thrd_detach(thrd_current()); for (size_t i = 0; i < 5; i++) { sleep(1); printf("i=%zu\n", i); } thrd_exit(0); } int main(void) { ...

   C LANGUAGE,MULITHREAD,MAIN THREAD     2020-08-14 21:20:04

  + operation on JavaScript objects

In JavaScript, there are two types of values: primitive and object. Primitives consist undefined, null, boolean, number and string. Other values such as array and function are objects. When applying + operation on different type of values, there would be three kinds of type conversion. Primitive conversion Number conversion String conversion There three type conversions have corresponding abstract operations in JavaScript: ToPrimitive(), ToNumber(), ToString(). For number additi...

   JAVASCRIPT,PROGRAMMING     2018-10-12 22:19:12